Population class extension: termination functions module

Main script to provide the termination functions class extensions

class binarycpython.utils.population_extensions.termination_functions.termination_functions(**kwargs)[source]

Bases: object

Extension for the Population class containing the code for termination functions

exit(code=None, message=True, flush=True, stacktrace=False)[source]

Exit function: use this to exit from a Population object. Really it’s just a wrapper for sys.exit() to return the correct exit code, but also to post a message (if message is True, default is True) and perhaps a stacktrace (if stacktrace is True, default is False).

was_killed()[source]

Function to determine if the process was killed. Returns True if so, false otherwise.